import { objectAny } from "../../options/base";
import { mySchoolStore } from "../../store";

const riderUserCenter=uniCloud.importObject(`rider-user-center`,{customUI: true})

export async function db_getBillListDetails({
    moneyType,
    statusType,
    startTime,
    endTime
}= {} as {
    moneyType:number,
    statusType:number,
    startTime:number,
    endTime:number
}):Promise<{
    myErrCode:number;
    errMsg?:string;
    data?:{
        list:Array<objectAny>;
        statistics?:{
            completeCount:number        //完成订单数量
            cancelCount:number          //取消订单数量
            turnCount:number           //转单订单数量
        }
    }
}>{
    const schoolStore = mySchoolStore();
    const schoolId=schoolStore.mySchool._id

    return riderUserCenter.getBillListDetails(schoolId,{
        moneyType,
        statusType,
        startTime,
        endTime
    })
}